import UIKit

public struct ListConfig {
    // 基本列表属性
    public let font: UIFont
    public let textColor: UIColor
    public let backgroundColor: UIColor
    public let bulletColor: UIColor
    public let bulletFont: UIFont
    public let indentationWidth: CGFloat
    public let bulletWidth: CGFloat
    public let lineSpacing: CGFloat
    public let itemSpacing: CGFloat
    
    // 任务列表属性
    public let taskListCheckboxSize: CGFloat
    public let taskListCheckboxTintColor: UIColor
    public let taskListTextColor: UIColor
    public let taskListCompletedTextColor: UIColor
    public let taskListStrikethrough: Bool
    public let taskListIndentation: CGFloat
    public let taskListSpacing: CGFloat
    
    public init(
        // 基本列表参数
        font: UIFont = .systemFont(ofSize: 16),
        textColor: UIColor = .label,
        backgroundColor: UIColor = .clear,
        bulletColor: UIColor = .label,
        bulletFont: UIFont = .systemFont(ofSize: 16),
        indentationWidth: CGFloat = 20,
        bulletWidth: CGFloat = 20,
        lineSpacing: CGFloat = 4,
        itemSpacing: CGFloat = 8,
        
        // 任务列表参数
        taskListCheckboxSize: CGFloat = 22,
        taskListCheckboxTintColor: UIColor = .systemBlue,
        taskListTextColor: UIColor = .label,
        taskListCompletedTextColor: UIColor = .secondaryLabel,
        taskListStrikethrough: Bool = true,
        taskListIndentation: CGFloat = 8,
        taskListSpacing: CGFloat = 12
    ) {
        self.font = font
        self.textColor = textColor
        self.backgroundColor = backgroundColor
        self.bulletColor = bulletColor
        self.bulletFont = bulletFont
        self.indentationWidth = indentationWidth
        self.bulletWidth = bulletWidth
        self.lineSpacing = lineSpacing
        self.itemSpacing = itemSpacing
        
        self.taskListCheckboxSize = taskListCheckboxSize
        self.taskListCheckboxTintColor = taskListCheckboxTintColor
        self.taskListTextColor = taskListTextColor
        self.taskListCompletedTextColor = taskListCompletedTextColor
        self.taskListStrikethrough = taskListStrikethrough
        self.taskListIndentation = taskListIndentation
        self.taskListSpacing = taskListSpacing
    }
    
    // 预定义的浅色主题样式
    public static let light = ListConfig()
    
    // 预定义的深色主题样式
    public static let dark = ListConfig(
        textColor: .white,
        bulletColor: .white,
        taskListTextColor: .white,
        taskListCompletedTextColor: .gray
    )
} 